package com.lhsy.djcloud.service.impl;

import com.lhsy.djcloud.controller.vo.SearchVo;
import com.lhsy.djcloud.entity.FileMessage;
import com.lhsy.djcloud.mapper.FileMessageMapper;
import com.lhsy.djcloud.service.FileMessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzw
 * @since 2020-09-14
 */
@Service
public class FileMessageServiceImpl extends ServiceImpl<FileMessageMapper, FileMessage> implements FileMessageService {
    @Autowired private FileMessageMapper fileMessageMapper;
    @Override
    public List<FileMessage> selectByTargetId(Integer userId,SearchVo searchVo) {
        return fileMessageMapper.selectByTargetId(userId,searchVo.getStartTime(),searchVo.getEndTime(),searchVo.getParams());
    }

    @Override
    public List<FileMessage> selectBySendId(Integer userId, SearchVo searchVo) {
        return fileMessageMapper.selectBySendId(userId,searchVo.getStartTime(),searchVo.getEndTime(),searchVo.getParams());
    }
}
